The present invention relates to a data write control system and a method therefor and, more particularly, to a data write control system and a method therefor that are capable of avoiding a situation where the data destruction in a disk such as a floppy disk remains unknown.
In recent years, a computer system is generally provided with a hard disk drive (HDD) as a standardized component. A recording medium (magnetic disk) in the hard disk drive is not removable. To be convenient for a user to use a recording medium, a computer system provided with the hard disk drive is also provided with a floppy disk drive (FDD).
A floppy disk drive adapted to use a 1.44 MB floppy disk is generally designed to transfer and write 512 bytes of data in 8 ms for a sector. In other words, 1-byte data must be transferred and written in 16 xcexcs. The data to be written is transferred to a floppy disk controller (FDC) in units of 1-byte by a DMA (direct memory access) controller (DMAC). That is, the bus of the computer system is occupied and released for each transfer of 1-byte data.
Meanwhile, in a computer system provided with a multi-task OS and adapted to process a plurality of applications in parallel, various bus-user devices (I/O devices) loaded in the computer system frequently issue interrupt requests (IRQ) and give rise to a severe contest for occupying the bus. When a data write operation for the floppy disk drive is carried out in the state where the system suffers an extraordinarily heavy load, it is not always possible to surely occupy the bus at good timing for transferring 1-byte data in 16 xcexcs.
If such is the case, DMA underrun (or DMA overrun) may occur. Conventionally, however, the probability that data of succeeding sectors may be destroyed because of such DMA underrun occurrence has not been taken into consideration.
Accordingly, it is an object of the present invention to provide a data write control system and a method therefor that are capable of efficiently avoiding a situation where the destruction of data in a disk such as a floppy disk remains unknown.
It is another object of the present invention to provide a data write control system and a method therefor that are capable of efficiently checking and securing data in sectors succeeding to the last sector of sectors targeted for writing, even if DMA underrun has occurred on the last byte of the last sector.
It is still another object of the present invention to provide a data write control system and a method therefor that are capable of efficiently protecting data in a sector located next to the last sector of sectors targeted for writing, from being destroyed, even if DMA underrun has occurred on the last byte of the last sector.
According to an aspect of the present invention, there is provided a data write control method for writing data onto a disk in response to a write request, comprising the steps of: storing the data in a predetermined area, the data involving a probability of being unsuccessfully written onto a disk; writing the data onto the disk; reading out the written data from the disk; and comparing the read-out data with the data stored in the predetermined area so as to determine whether or not the data written onto the disk has been successfully written.
According to another aspect of the present invention, there is provided a data write control system for writing data onto a disk in response to a write request, comprising: means for storing the data in a predetermined area before the data is written onto a disk, the data involving a probability of being unsuccessfully written onto the disk; means for, after the data has been written on the disk, reading out the written data from the disk; and means for comparing the read-out data with the data stored in the predetermined area so as to determine whether or not the data written onto the disk has been successfully written.
According to still another aspect of the present invention, there is provided a storage medium storing computer-executable program code that performs data write control in writing data onto a disk in response to a write request, the program code comprising: means for causing a computer to store data in a predetermined area, the data involving a probability of being unsuccessfully written onto a disk; means for causing a computer to write the data onto the disk; means for causing a computer to read out the written data from the disk; and means for causing a computer to comparing the read-out data with the data stored in the predetermined area so as to determine whether or not the data written onto the disk has been successfully written.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.